#!/bin/bash

ramfs_path=./

if [ $# -eq 1 ]; then
	if [ -d $1 ]; then
		ramfs_path=$1
	fi
elif [ $# -gt 1 ]; then
	echo "Too many parameters"
	exit
fi

mount -t sysfs     sysfs   ${ramfs_path}/sys/
mount -t proc      proc    ${ramfs_path}/proc/
mount -t devtmpfs  udev    ${ramfs_path}/dev/
mount -t devpts    devpts  ${ramfs_path}/dev/pts/
